package com.huidu.bitrade.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.huidu.bitrade.constant.BusinessLevelEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import com.huidu.bitrade.constant.CommonStatus;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 商家认证保证金
 */
@Entity
@Data
@Table(name = "business_deposit_strategy")
@ApiModel("商家认证保证金")
public class BusinessDepositStrategy {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty("押金数额")
    @Column(columnDefinition = "decimal(18,8) comment '保证金数额'")
    private BigDecimal amount;

    @ApiModelProperty("每日限额")
    private BigDecimal dailyAmount;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ManyToOne
    @JoinColumn(name = "admin_id")
    private Admin admin;

    @ApiModelProperty("1.黄金2.铂金3.钻石")
    @Enumerated(EnumType.ORDINAL)
    private BusinessLevelEnum businessLevelEnum;

    @ApiModelProperty("启用、禁用")
    @Enumerated(EnumType.ORDINAL)
    private CommonStatus status = CommonStatus.NORMAL;

    private String banner;
}
